home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13353 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.infi.net!usenet
  2. From: Steve Rountree <srndtree@infi.net>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Compare function
  5. Date: Sat, 06 Apr 1996 11:18:07 -0800
  6. Organization: InfiNet
  7. Message-ID: <3166C36F.7548@infi.net>
  8. References: <4k52cf$6ok@freenet-news.carleton.ca>
  9. NNTP-Posting-Host: h-agate.dc.infi.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Jerry Boyd wrote:
  16. > How would I write a compare function (compare_strings, for
  17. > instance) that uses character pointers.  I need something
  18. > that would take a string and compare it to a list, or dictionary,
  19. > of other words.
  20. > --
  21.  
  22.  
  23.   How does it need to differ from the available string comparison 
  24. routines? (ie. strcmp, strcmpi(DOS), strstr, et al.).  If you are just 
  25. looking for a match then you could use these existing functions within a 
  26. loop that does a comparison on individual words as they are read from a 
  27. file or table.
  28.  
  29.   If there is more to your problem then what are your additional 
  30. constraints.
  31.  
  32. Steve Rountree
  33.